package demo2;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class DEMO_04 {
    public static void main(String[] args) throws IOException {
        Reader reader = new FileReader("d:/temp/text2.txt");
        //每次读取一个字符
        while (true) {
            int read = reader.read();
            if (read == -1) break;
            System.out.println(read);
        }
        reader.close();
    }
}
